#!/usr/bin/env bash

## configure and install minimal openbox desktop environment

## check for sudo/root
if ! [ $(id -u) = 0 ]; then
  echo "This script must run with sudo, try again..."
  exit 1
fi

sudo apt update

    sudo apt install --no-install-recommends \
    xorg \
    mesa-vulkan-drivers \
    xfonts-cyrillic \
    mesa-utils 

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install meson dh-autoreconf libxcb-keysyms1-dev libpango1.0-dev libxcb-util0-dev xcb libxcb1-dev libxcb-icccm4-dev libyajl-dev libev-dev libxcb-xkb-dev libxcb-cursor-dev libxkbcommon-dev libxcb-xinerama0-dev libxkbcommon-x11-dev libstartup-notification0-dev libxcb-randr0-dev libxcb-xrm0 libxcb-xrm-dev libxcb-shape0 libxcb-shape0-dev 
sudo apt-get install --no-install-recommends \
	network-manager 
echo
git clone https://github.com/Airblader/i3 i3-gaps
cd i3-gaps
mkdir -p build && cd build
meson --prefix /usr/local
echo
echo i3 install complete, please reboot and issue 'startx'
echo
